package ecoll.client.database;

import java.util.ArrayList;

import com.google.gwt.user.client.rpc.AsyncCallback;

import ecoll.client.dictionary.Definition;

public interface DatabaseServiceAsync {

	public void getProfileData(String login, AsyncCallback<ProfileData> callback)
			throws RuntimeException;

	public void findProfileData(ProfileData profileData,
			AsyncCallback<ArrayList<ProfileData>> profiles)
			throws RuntimeException;

	public void updateProfileData(ProfileData profileData,
			AsyncCallback<Void> callback);

	public void getNews(AsyncCallback<ArrayList<News>> callback)
			throws IllegalArgumentException;

	public void putNews(String news, AsyncCallback<Void> callback);

	public void getDefinitions(long fileId,
			AsyncCallback<ArrayList<Definition>> callback)
			throws RuntimeException;

	public void putDefinitions(ArrayList<Definition> definitions, long id,
			AsyncCallback<Void> callback) throws RuntimeException;

	void getFiles(AsyncCallback<ArrayList<File>> callback);

	public void shareFile(long fileId, String user, String rights,
			AsyncCallback<Void> callback) throws RuntimeException;

	public void getBlobUrl(String directory, AsyncCallback<String> callback);
}
